//
//  WJImageView.m
//  天气
//
//  Created by dllo on 16/8/23.
//  Copyright © 2016年 WJ. All rights reserved.
//

#import "WJImageView.h"

@implementation WJImageView

+ (UIImage *)imageWithName:(NSString *)name hour:(NSString *)hour
{
    if (hour.integerValue > 5 && hour.integerValue < 19) {
        if ([name isEqualToString:@"晴"]) {
            return [UIImage imageNamed:@"ww0"];
        }else if([name isEqualToString:@"多云"]){
            return  [UIImage imageNamed:@"ww1"];
            
        }else if([name isEqualToString:@"阴"]){
            return  [UIImage imageNamed:@"ww2"];
            
        }else if([name isEqualToString:@"小雨"]){
            return  [UIImage imageNamed:@"ww7"];
            
        }else if([name isEqualToString:@"中雨"]){
            return  [UIImage imageNamed:@"ww8"];
            
        }else if([name isEqualToString:@"大雨"]){
            return  [UIImage imageNamed:@"ww19"];
            
        }else if([name isEqualToString:@"阵雨"]){
            return  [UIImage imageNamed:@"ww3"];
            
        }else if([name isEqualToString:@"雷阵雨"]){
            return  [UIImage imageNamed:@"ww10"];
            
        }else {
            
            return [UIImage imageNamed:@"ww10"];
        }
 
        
    }else{
        
        if ([name isEqualToString:@"晴"]) {
            return [UIImage imageNamed:@"ww30"];
        }else if([name isEqualToString:@"多云"]){
            return [UIImage imageNamed:@"ww31"];
            
        }else if([name isEqualToString:@"阴"]){
            return [UIImage imageNamed:@"ww2"];
            
        }else if([name isEqualToString:@"小雨"]){
            return [UIImage imageNamed:@"ww7"];
            
        }else if([name isEqualToString:@"中雨"]){
            return [UIImage imageNamed:@"ww8"];
            
        }else if([name isEqualToString:@"大雨"]){
            return [UIImage imageNamed:@"ww19"];
            
        }else if([name isEqualToString:@"阵雨"]){
            return [UIImage imageNamed:@"ww33"];
            
        }else if([name isEqualToString:@"雷阵雨"]){
            return [UIImage imageNamed:@"ww33"];
            
        }else {
            return [UIImage imageNamed:@"ww10"];
            
        }
  
    }
    
    
}

+ (UIImage *)imageWithDayName:(NSString *)name
{
    if ([name isEqualToString:@"晴"]) {
        return [UIImage imageNamed:@"ww0"];
    }else if([name isEqualToString:@"多云"]){
        return  [UIImage imageNamed:@"ww1"];
        
    }else if([name isEqualToString:@"阴"]){
        return  [UIImage imageNamed:@"ww2"];
        
    }else if([name isEqualToString:@"小雨"]){
        return  [UIImage imageNamed:@"ww7"];
        
    }else if([name isEqualToString:@"中雨"]){
        return  [UIImage imageNamed:@"ww8"];
        
    }else if([name isEqualToString:@"大雨"]){
        return  [UIImage imageNamed:@"ww19"];
        
    }else if([name isEqualToString:@"阵雨"]){
        return  [UIImage imageNamed:@"ww3"];
        
    }else if([name isEqualToString:@"雷阵雨"]){
        return  [UIImage imageNamed:@"ww10"];
        
    }else {
        
        return [UIImage imageNamed:@"ww10"];
    }
}

+ (UIImage *)imageWithNightName:(NSString *)name
{
    if ([name isEqualToString:@"晴"]) {
        return [UIImage imageNamed:@"ww30"];
    }else if([name isEqualToString:@"多云"]){
        return [UIImage imageNamed:@"ww31"];
        
    }else if([name isEqualToString:@"阴"]){
        return [UIImage imageNamed:@"ww2"];
        
    }else if([name isEqualToString:@"小雨"]){
        return [UIImage imageNamed:@"ww7"];
        
    }else if([name isEqualToString:@"中雨"]){
        return [UIImage imageNamed:@"ww8"];
        
    }else if([name isEqualToString:@"大雨"]){
        return [UIImage imageNamed:@"ww19"];
        
    }else if([name isEqualToString:@"阵雨"]){
        return [UIImage imageNamed:@"ww33"];
        
    }else if([name isEqualToString:@"雷阵雨"]){
        return [UIImage imageNamed:@"ww33"];
        
    }else {
        return [UIImage imageNamed:@"ww10"];
        
    }
}







@end
